<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<style>
			.test{
				width: 100px;
				height: 100px;
				background-color: red;
			}
		</style>
	</head>
	<body>
		<div class="test" id="test">
			
		</div>
		<script>
			var a = document.getElementById("test");
			a.onmouseover = function(){
				a.style.opacity = 0.6;
			}
			a.onmouseout = function(){
				a.style.opacity = 1;
			}
		</script>
	</body>
</html>
